SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[tb_fa_person]') AND name = N'pk_tb_fa_person'

--use [family-annal]
--GO
---- Drop trigger in table tb_fa_person
--IF OBJECT_ID ('tb_fa_person.trigger_fa_person_insert_update','TR') IS NOT NULL
--   DROP TRIGGER tb_fa_person.trigger_fa_person_insert_update;
--GO
---- Drop table and all constraint if exists
--IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[tb_fa_person]') AND name = N'pk_tb_fa_person')
--BEGIN
--ALTER TABLE [dbo].[tb_fa_person] DROP CONSTRAINT [pk_tb_fa_person]
--END
--GO
--USE [family-annal]
--GO
--IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_fa_person]') AND type in (N'U'))
--DROP TABLE [dbo].[tb_fa_person]
--GO